﻿using System.Web.Mvc;
using Castle.Core.Logging;
using Inovout.Web.Filters;
using System;
using System.Diagnostics;

namespace Inovout.Web.Controllers
{
    [Authenticate,Authorize]
    public abstract class BaseController : Controller
    {
        internal IApplication Application
        {
            get;
            private set;
        }
        private Stopwatch stopwatch;
        public BaseController()
        {
            // todo:增加一个计时器
            //由于没有拿到ASP.NET MVC 4的源代码，不知为何重写Execute没用，需进一步验证。
            stopwatch = Stopwatch.StartNew();
            Application=ComponentRegistry.Resolve<IApplication>();
        }
        protected internal ILogger Logger
        {
            get;
            internal set;
        }
    }

}
